package cn.miju.admin.system.vo;

import cn.miju.admin.framework.model.BaseInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * <pre>
 * 保存用户
 * </pre>
 *
 * @author zhuming
 * @version 1.0.0
 * @since 2023-04-06 11:00
 */
@Data
@ApiModel
@EqualsAndHashCode(callSuper = true)
public class UserSaveInVO extends BaseInfo {
    /**
     * 用户ID
     */
    @ApiModelProperty(value = "用户ID[传空表示新增]")
    private Long id;
    /**
     * 账号
     */
    @ApiModelProperty(value = "账号", required = true)
    @NotBlank(message = "传入账号不能为空")
    private String accountNo;
    /**
     * 密码
     */
    @ApiModelProperty(value = "密码[新增必传]")
    private String password;
    /**
     * 姓名
     */
    @ApiModelProperty(value = "姓名", required = true)
    @NotBlank(message = "传入姓名不能为空")
    private String username;
    /**
     * 性别[0：保密 1：男 2：女]
     */
    @ApiModelProperty(value = "性别[0：保密 1：男 2：女]", required = true)
    @NotBlank(message = "传入性别不能为空")
    private String sex;
    /**
     * 手机号
     */
    @ApiModelProperty(value = "手机号", required = true)
    @NotBlank(message = "传入手机号不能为空")
    private String mobile;
    /**
     * 邮箱
     */
    @ApiModelProperty(value = "邮箱", required = true)
    @NotBlank(message = "传入邮箱不能为空")
    private String email;
    /**
     * 所属角色
     */
    @ApiModelProperty(value = "所属角色", required = true)
    @NotNull(message = "传入所属角色不能为空")
    private List<Long> role;
    /**
     * 所属组织
     */
    @ApiModelProperty(value = "所属组织", required = true)
    @NotNull(message = "传入所属组织不能为空")
    private Long group;
}
